package jdbcDemo;

public class Test{
    public static void main(String[] args) throws Exception {
        UserDao userDao=new UserDao();
        Class.forName("com.mysql.cj.jdbc.Driver");
        System.out.println("操作之前:");
        userDao.queryAll();

        User user=new User();
        user.setUserName("大白");
        user.setPassword("DB");
        userDao.addStudent(user);
        System.out.println("\n添加了一个用户后:");
        userDao.queryAll();

        System.out.println("查询叫大白的人");
        userDao.query("大白");
        System.out.println("");

        userDao.delete("白居易");
        userDao.queryAll();

        userDao.update();
        userDao.queryAll();

        userDao.queryAll();
    }
}


